Optimal. Leaf size=274 \[ \frac{\log \left (a+b x+c x^2\right ) (-a B f+A b f+B c d)}{2 \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )}-\frac{\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )}+\frac{\sqrt{f} \tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{d}}\right ) (a A f-A c d+b B d)}{\sqrt{d} \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right )}{\sqrt{b^2-4 a c} \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.651443, antiderivative size = 274, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.259 \[ \frac{\log \left (a+b x+c x^2\right ) (-a B f+A b f+B c d)}{2 \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )}-\frac{\log \left (d+f x^2\right ) (-a B f+A b f+B c d)}{2 \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )}+\frac{\sqrt{f} \tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{d}}\right ) (a A f-A c d+b B d)}{\sqrt{d} \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right )}{\sqrt{b^2-4 a c} \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )} \]
Antiderivative was successfully verified.
[In] Int[(A + B*x)/((a + b*x + c*x^2)*(d + f*x^2)),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((B*x+A)/(c*x**2+b*x+a)/(f*x**2+d),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.76498, size = 212, normalized size = 0.77 \[ \frac{\sqrt{d} \left (\sqrt{4 a c-b^2} (-a B f+A b f+B c d) \left (\log (a+x (b+c x))-\log \left (d+f x^2\right )\right )+2 \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right ) \left (2 A c (c d-a f)-b B (a f+c d)+A b^2 f\right )\right )+2 \sqrt{f} \sqrt{4 a c-b^2} \tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{d}}\right ) (a A f-A c d+b B d)}{2 \sqrt{d} \sqrt{4 a c-b^2} \left (f \left (a^2 f+b^2 d\right )-2 a c d f+c^2 d^2\right )} \]
Antiderivative was successfully verified.
[In] Integrate[(A + B*x)/((a + b*x + c*x^2)*(d + f*x^2)),x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.012, size = 745, normalized size = 2.7 \[{\frac{\ln \left ( c{x}^{2}+bx+a \right ) Abf}{2\,{a}^{2}{f}^{2}-4\,acdf+2\,{b}^{2}df+2\,{c}^{2}{d}^{2}}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) Baf}{2\,{a}^{2}{f}^{2}-4\,acdf+2\,{b}^{2}df+2\,{c}^{2}{d}^{2}}}+{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) Bd}{2\,{a}^{2}{f}^{2}-4\,acdf+2\,{b}^{2}df+2\,{c}^{2}{d}^{2}}}-2\,{\frac{Aacf}{ \left ({a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2} \right ) \sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{A{b}^{2}f}{{a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+2\,{\frac{A{c}^{2}d}{ \left ({a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2} \right ) \sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{Babf}{{a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{Bbcd}{{a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{f\ln \left ( f{x}^{2}+d \right ) Ab}{2\,{a}^{2}{f}^{2}-4\,acdf+2\,{b}^{2}df+2\,{c}^{2}{d}^{2}}}+{\frac{f\ln \left ( f{x}^{2}+d \right ) aB}{2\,{a}^{2}{f}^{2}-4\,acdf+2\,{b}^{2}df+2\,{c}^{2}{d}^{2}}}-{\frac{\ln \left ( f{x}^{2}+d \right ) Bcd}{2\,{a}^{2}{f}^{2}-4\,acdf+2\,{b}^{2}df+2\,{c}^{2}{d}^{2}}}+{\frac{Aa{f}^{2}}{{a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2}}\arctan \left ({fx{\frac{1}{\sqrt{df}}}} \right ){\frac{1}{\sqrt{df}}}}-{\frac{Acdf}{{a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2}}\arctan \left ({fx{\frac{1}{\sqrt{df}}}} \right ){\frac{1}{\sqrt{df}}}}+{\frac{Bbdf}{{a}^{2}{f}^{2}-2\,acdf+{b}^{2}df+{c}^{2}{d}^{2}}\arctan \left ({fx{\frac{1}{\sqrt{df}}}} \right ){\frac{1}{\sqrt{df}}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((B*x+A)/(c*x^2+b*x+a)/(f*x^2+d),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)/((c*x^2 + b*x + a)*(f*x^2 + d)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)/((c*x^2 + b*x + a)*(f*x^2 + d)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x+A)/(c*x**2+b*x+a)/(f*x**2+d),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.266682, size = 359, normalized size = 1.31 \[ \frac{{\left (B c d - B a f + A b f\right )}{\rm ln}\left (c x^{2} + b x + a\right )}{2 \,{\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )}} - \frac{{\left (B c d - B a f + A b f\right )}{\rm ln}\left (f x^{2} + d\right )}{2 \,{\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )}} + \frac{{\left (B b d f - A c d f + A a f^{2}\right )} \arctan \left (\frac{f x}{\sqrt{d f}}\right )}{{\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )} \sqrt{d f}} - \frac{{\left (B b c d - 2 \, A c^{2} d + B a b f - A b^{2} f + 2 \, A a c f\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (c^{2} d^{2} + b^{2} d f - 2 \, a c d f + a^{2} f^{2}\right )} \sqrt{-b^{2} + 4 \, a c}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((B*x + A)/((c*x^2 + b*x + a)*(f*x^2 + d)),x, algorithm="giac")
[Out]